<script lang="ts" setup>
import useOrder from "@/store/order";
const { order } = useOrder();
const props = defineProps(["list"]);
const _onClick = (id: number) => {
  order.actionId = id;
  uni.switchTab({
    url: "/pages/shop/index/index",
  });
};
</script>

<template>
  <!-- 分类 -->
  <view class="grid">
    <uv-grid col="5" :border="false">
      <uv-grid-item
        v-for="(item, index) in list"
        :key="index"
        @click="_onClick(item.id)"
      >
        <uv-image :src="item.thumb" width="40px" height="40px"></uv-image>
        <text class="grid-text font12999">{{ item.title }}</text>
      </uv-grid-item>
    </uv-grid>
    <!-- end -->
  </view>
</template>

<style lang="scss" scoped>
.grid {
  padding-top: 20px;
  .font12999 {
    padding-top: 5px;
  }
}
</style>
